/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Persistencia;

import Persistencia.MySQL.MysqlDAOFactory;
import Persistencia.Oracle.OracleDAOFactory;

/**
 *
 * @author zeta
 */
public abstract class DAOFactory {

    /**
     *
     */
    public static final int MYSQL = 1;
    /**
     *
     */
    public static final int ORACLE= 2;

    /**
     *
     * @return
     */
    public abstract IExportadorDAO getExportadorDAO();
    /**
     *
     * @return
     */
    public abstract IImportadorDAO getImportadorDAO();
    /**
     *
     * @return
     */
    public abstract ITransporteDAO getTransporteDAO();
    /**
     *
     * @return
     */
    public abstract IResponsableDAO getResponsableDAO();
    /**
     *
     * @return
     */
    public abstract IResponsableSenasaDAO getResponsableSenasaDAO();
    /**
     *
     * @return
     */
    public abstract IPagoSenasaDAO getPagoSenasaDAO();
    /**
     *
     * @return
     */
    public abstract IBoletaSenasaDAO getBoletaSenasaDAO();
    /**
     *
     * @return
     */
    public abstract ISanitarioDAO getSanitarioDAO();

    /**
     *
     * @param whichFactory
     * @return
     */
    public static DAOFactory getDAOFactory(
      int whichFactory) {

    switch (whichFactory) {
      case MYSQL:
          return new MysqlDAOFactory();
      case ORACLE    :
          return new OracleDAOFactory();
      /*case SYBASE    :
          return new SybaseDAOFactory();
      ...*/
      default           :
          return null;
    }
    }
}
